import { createSlice, PayloadAction } from "@reduxjs/toolkit"



const initialState = {
    isLogin:false
}

const userInfoSlice = createSlice({
    name:"userInfo",
    initialState,
    reducers:{
        setIsLogin:(state,action:PayloadAction<boolean>)=>{
            state.isLogin = action.payload
        }
    }
})

export const {setIsLogin} = userInfoSlice.actions
const reducer = userInfoSlice.reducer
export default reducer